home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / Sources / Makefile < prev    next >
Encoding:
Makefile  |  1996-09-27  |  2.1 KB  |  91 lines

  1. include Configfile
  2.  
  3. MAKE_DIRS=    src bindings man doc
  4.  
  5. default:    all
  6.  
  7. #{{{}}}
  8. #{{{  recursiv targets
  9. TARGETS=    all lint install deinstall depend pseudo_depend awk \
  10.         do_check_common
  11.  
  12. $(TARGETS):
  13.         for i in $(MAKE_DIRS); do \
  14.             (echo "$$i: $@"; cd $$i; $(MAKE) $@) \
  15.         done
  16. #}}}
  17. #{{{  tags
  18. tags:
  19.         for i in $(MAKE_DIRS); do \
  20.             ( cd $$i; $(MAKE) $@) \
  21.         done
  22.         $(SCRIPT_DIR)/cattags */tags */*/tags
  23. #}}}
  24. #{{{  clean/clobber
  25. clean:
  26.         for i in $(MAKE_DIRS); do \
  27.             ( cd $$i; $(MAKE) $@) \
  28.         done
  29.         rm -f tags core
  30.  
  31. clobber:
  32.         for i in $(MAKE_DIRS); do \
  33.             ( cd $$i; $(MAKE) $@) \
  34.         done
  35.         rm -f Configfile core $(TAR_DIR)/origami.tar.Z tags
  36.         rm -r -f $(SCRIPT_DIR)
  37. #}}}
  38. #{{{  (de)install
  39. INSTALL_DIRS=    $(BIN_PATH) $(MAN_PATH) $(ORIGAMI_PATH)/doc \
  40.         $(ORIGAMI_PATH)/bindings $(ORIGAMI_PATH)
  41.  
  42. install:    $(INSTALL_DIRS)
  43.  
  44. dir_install:
  45.         for i in $(INSTALL_DIRS); do \
  46.             ( $(DIR_INSTALL) -m 755 $$i; ) \
  47.         done
  48.  
  49. dir_deinstall:
  50.         -for i in $(INSTALL_DIRS); do \
  51.             rmdir $$i;  \
  52.         done
  53.  
  54. all_install:   dir_install install
  55.  
  56. all_deinstall: deinstall dis_deinstall dir_deinstall
  57.  
  58. #{{{  INSTALL_DIRS
  59. $(INSTALL_DIRS):
  60.         @echo "no install directory" $@ "!"
  61.         @echo "use 'make all_install' for generating a complete installation"
  62.         @echo "or  'make dir_install' for generating all needed directories";exit 1
  63. #}}}
  64. #{{{  distribution
  65. TAR_DIR=/tmp
  66.  
  67. distribution:    $(TAR_DIR)/origami.tar.Z $(TAR_DIR)
  68.  
  69. dis_install:    $(INSTALL_DIRS) $(TAR_DIR)/origami.tar.Z
  70.         cd $(TAR_DIR);$(FILE_INSTALL) -m 644 origami.tar.Z $(ORIGAMI_PATH)
  71.         rm -f $(TAR_DIR)/origami.tar.Z
  72.  
  73. dis_deinstall:
  74.         -rm -f $(ORIGAMI_PATH)/origami.tar.Z
  75.  
  76. $(TAR_DIR)/origami.tar.Z:    $(MAKE_DIRS)/* $(MAKE_DIRS)/*
  77.         rm -r -f $(TAR_DIR)/origami
  78.         cp -r . $(TAR_DIR)/origami
  79.         rm -r -f $(TAR_DIR)/origami/*/*/RCS
  80.         rm -r -f $(TAR_DIR)/origami/*/RCS
  81.         rm -r -f $(TAR_DIR)/.fold
  82.         rm -r -f $(TAR_DIR)/origami/src/amiga
  83.         rm -r -f $(TAR_DIR)/origami/src/dos
  84.         cd $(TAR_DIR)/origami;$(MAKE) clobber;
  85.         cp Configfile $(TAR_DIR)/origami
  86.         cd $(TAR_DIR)/origami;$(MAKE) depend;$(MAKE) awk;
  87.         cd $(TAR_DIR);tar cvf - origami | compress >origami.tar.Z
  88.         rm -r $(TAR_DIR)/origami
  89. #}}}
  90. #}}}
  91.